package com.google.code.fulltank.usage;

import org.joda.time.LocalDate;

/**
 * Fuel usage history for uniform daily fuel usage (i.e. same number of litres
 * used every day).
 * 
 * @author DL
 */
public class UniformFuelUsageHistory implements FuelUsageHistory {

    public UniformFuelUsageHistory(
        double dailyUsage, LocalDate firstDate, LocalDate lastDate) {

        this.dailyUsage = dailyUsage;
        this.firstDate = firstDate;
        this.lastDate = lastDate;
    }

    public double getFuelUsage(LocalDate date) {
        return dailyUsage;
    }

    public LocalDate getFirstDate() {
        return firstDate;
    }

    public LocalDate getLastDate() {
        return lastDate;
    }

    private final double dailyUsage;
    private final LocalDate firstDate;
    private final LocalDate lastDate;
}
